import express from 'express';
import * as oilController from './oil.controller';

const router = express.Router();

/**
 * 获取内容
 */
router.get('/oil', oilController.index);

/**
 * 获取内容(按 ID)
 */
router.get('/oil/:postId', oilController.oilDetail);

/**
 * 创建内容
 */
router.post('/oil', oilController.store);

/**
 * 更新内容
 */
router.patch('/oil/:postId', oilController.update);

/**
 * 删除内容
 */
router.delete('/oil/:postId', oilController.destroy);

/**
 * 导出路由
 */
export default router;
